fix: prerender output paths should not include basename#14739
fix: prerender output paths should not include basename#14739korkt-kim wants to merge 1 commit intoremix-run:devfrom
Conversation
|
Hi @korkt-kim, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
🦋 Changeset detectedLatest commit: 6a652d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
440f2b2 to
8359448
Compare
e458b55 to
667d299
Compare
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
667d299 to
c11d295
Compare
c11d295 to
6a652d5
Compare
Description
When using basename in react-router.config.ts, prerendered files are incorrectly output to a subfolder matching the basename (e.g., build/client/base/index.html instead of
build/client/index.html).
The basename is meant to define the deployment path prefix, not the build output directory structure. The prerender logic was using normalizedPath (which includes basename)
instead of the actual route path for determining output file locations.
Changes
Impact
No compatibility issues - This is a bug fix that corrects the output path behavior. Previously, prerendered files with basename would be placed in wrong directories, causing
404 errors when deployed.
Fixes #14587